//
//  OITransportToolbarItem.m
//  OrchIDE
//
//  Created by local2 on 8/15/07.
//  Copyright 2007 __MyCompanyName__. All rights reserved.
//

#import "OITransportToolbarItem.h"


@implementation OITransportToolbarItem
- (void)validate
{
	NSSegmentedControl *transport = (NSSegmentedControl *)[self view];
	
	id validator = [NSApp targetForAction:[self action] to:[self target] from:self];
	
	if(!validator || ![validator respondsToSelector:[self action]]) {
		[transport setEnabled:NO];
	} else if([validator respondsToSelector:@selector(validateToolbarItem:)]) {
		[transport setEnabled:[validator validateToolbarItem:self]];
	} else {
		[transport setEnabled:YES];
	}
}
@end
